package ch01.handler;

/**
 * Created by zc on 2016/11/20.
 */
public class Client {

    public static void main(String[] args){
        Request request = new Request();
        request.setLevel(2);
        Handler handler1 = new ConcreateHandler1();
        Handler handler2 = new ConcreateHandler2();
        handler1.setLevel(1);
        handler2.setLevel(2);
        handler1.setNextHandler(handler2);

        System.out.println(handler1.handlerRequest(request));
    }
}
